//2009/07/25 17:19:12
#include <iostream>
#include <string>
#include <vector>

using namespace std;

class ImageDithering
{
public:
    int count(string dithered, vector <string> screen)
    {
		int score = 0;
		for(int i=0; i<screen.size(); i++)
		{
			for(int j=0; j<screen[0].size(); j++)
			{
				if(dithered.find(screen[i][j]) != -1)
					score++;
			}
		}
		return score;
    }
};
